import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 导入vue-aplayer
import APlayer from '@moefe/vue-aplayer';
// 导入mixin
import mixins from '@/api/mixin'
// import './plugins/element.js'
// 初始化样式
import '@/assets/css/normalize.css'
// 导入element-ui样式表
// import 'element-ui/lib/theme-chalk/index.css'
// 引入字体图标
import '../font/iconfont.css'
// 导入全局样式表
import '@/assets/css/global.css'
// 导入加载条样式
// import 'nprogress/nprogress.css'
// 导入动画样式
import '@/assets/css/animation.css'
// 图片懒加载
import VueLazyload from 'vue-lazyload'

Vue.config.productionTip = false

// $bus 事件总线的导入
Vue.prototype.$bus = new Vue()

Vue.use(VueLazyload, {
  // 预载高度比例
  preLoad: 1.3,
  loading: require('./assets/img1.webp'),
  error: require('./assets/img4.webp'),
  // 尝试次数
  attempt: 1
})
// 全局引入mixins
Vue.mixin(mixins)
Vue.use(APlayer, {
  defaultCover: 'https://github.com/u3u.png',
  productionTip: true,
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
